/* Once the DOM is loaded, put an observer on the search box. */
$j(document).ready(function() {
	if( $j("input#EventQuery").val() != "Search for events") {
		$j("input#EventQuery").css('color', 'black');
	}
	
	/* Clear the placeholder text out of the search bar text field, and make text black */
	$j("input#EventQuery").focus(function() {
		if( $j(this).val() == "Search for events" ) {
			$j(this).val("");
			$j(this).css('color', 'black');
		}
	});
	
	/* Put placeholder text (in grey) in the empty search bar text field */
	$j("input#EventQuery").blur(function() {
		if( $j(this).val() == "" ) {
			$j(this).val("Search for events");
			$j(this).css('color', 'gray');
		}
	});
});
